#pragma once
#include "../SCModuleManager.h"

struct SwrContext;
class Resampler
{
public:
	Resampler();

	~Resampler();

	int Open(AudioStream* srcas, AudioStream* destas);

	ResampleData* Resample(Frame* frame);

	void Close();


private:
	SwrContext *actx = NULL;

	int sample_rate = 0;
	int channels = 0;

	//AV_SAMPLE_FMT_S16
	int sampleOutputFmt = 1;

	ResampleData rd;
};